package com.gitee.hermer.engine.jars.dependent.zipkin.annotate;

import org.springframework.context.annotation.AdviceMode;
import org.springframework.context.annotation.AdviceModeImportSelector;
import org.springframework.context.annotation.AutoProxyRegistrar;
import org.springframework.context.annotation.DeferredImportSelector;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration;

import com.gitee.hermer.boot.jee.commons.reflect.ClassUtils;
import com.gitee.hermer.engine.jars.core.domain.EngineConstant;

public class EngineZipkinConfigurationSelector implements DeferredImportSelector {

	@Override
	public String[] selectImports(AnnotationMetadata importingClassMetadata) {
		try{
			if(ClassUtils.isAssignableValue(EngineConstant.CLASS_ENGINE_APP_CLASS_LOADER, Thread.currentThread().getContextClassLoader())){
				return new String[] {};
			}
		}catch (Exception e) {
		}
		return new String[] {EngineConstant.CLASS_NAME_ENGINE_ZIPKIN_CONFIGURATION};
	}

}
